package com.controll.xstream;

import java.io.FileInputStream;
import java.io.InputStream;

import com.bean.xstream.user.UserVo;
import com.thoughtworks.xstream.XStream;

public class parseXml2Bean {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {	
		
		InputStream is = new FileInputStream( "data/userInfo.xml" );
		XStream xStream = new XStream();
		xStream.processAnnotations(UserVo.class);
		//xStream.omitField(UserVo.class, "acc");
		UserVo user = new UserVo();
		user = (UserVo) xStream.fromXML(is);
		System.out.println(user.toString());
	}

}
